home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / msdos / raytrace / pov / feature / hello.pov < prev    next >
Text File  |  1994-03-28  |  3KB  |  129 lines

  1. // GRAVER 1.0 Demonstration file for POV-Ray 2.n
  2. // Illustrates several applications of Graver output files as height fields
  3. // and bump maps.
  4. // Richard LeVitt, CIS 76216,2066, March 1994
  5. //
  6. //Requires HELLO.GIF, GROOVES.GIF, and CURVES.GIF  
  7.  
  8. #include "colors.inc"
  9. #include "textures.inc"
  10. #include "stones.inc"
  11.  
  12. // WORLD ******************************************************************
  13. camera {
  14.    location  <-0, 3,-14>
  15.    direction <0, 0,  1.5>
  16.    up        <0, 1,  0>
  17.    right   <4/3, 0,  0>
  18.    look_at   <0, 3.01, 0>
  19. }
  20.  
  21. light_source {<20, 20, -30> color White}
  22.  
  23. //TEXTURES ****************************************************************
  24.  
  25. #declare BlueStone =   //Adapted from Mike Miller's Stone23 
  26. texture{Grnt29 scale <1, 1, 2> rotate <40, 0, 0> rotate <0, 0, 30>}
  27. texture{Grnt24a scale <2, 1, 2> rotate <40, 0, 0> rotate <0, 0, 30>}
  28. texture{Crack1 scale <1, 2, 1.5> rotate <0, 0, 40>}
  29. texture{pigment{color Blue filter 0.8}
  30.         finish{phong 1.0 phong_size 90}  
  31.        }
  32.  
  33. // OBJECTS ****************************************************************
  34. plane { -z, 0
  35.    pigment {Gold}
  36.    finish {diffuse 0.7 specular .4 roughness .1}
  37.    normal {
  38.       bump_map {
  39.          gif "curves.gif" 
  40.          bump_size 8
  41.          interpolate 2
  42.       }
  43.       scale 1.2 
  44.    }  
  45. }
  46.  
  47. object{  //box with engraved letters
  48.   intersection{
  49.     box {
  50.       <-4, 0,-1>, //near lower left corner
  51.       <4, 6, 2> //far upper right corner
  52.       texture{
  53.         BlueStone
  54.       } 
  55.     }
  56.     height_field { 
  57.       gif "hello.gif" 
  58.       translate <-.5, 0, 0>
  59.       scale <8, .2, 6>
  60.       rotate <-90, 0, 0>
  61.       translate <0, 0,-.817>      
  62.       pigment {Gold}
  63.       finish {diffuse 0.8 specular .7 roughness .1}
  64.       smooth
  65.     }
  66.   }
  67. }
  68.  
  69. sphere {
  70.   <0, 0, 0>, .75  
  71.     pigment {SeaGreen}
  72.     finish {diffuse 0.8 specular .6 roughness .1}
  73.     normal {
  74.       bump_map {
  75.          gif "grooves.gif"  
  76.          bump_size 10
  77.          interpolate 2
  78.          map_type 1    
  79.       }   
  80.     }
  81.     translate <-3.4, 5.5, -2.5>
  82. }
  83.  
  84. cylinder {
  85.   <0, 0, 0>,       
  86.   <0, .50, 0>, 1        
  87.   pigment {Maroon}
  88.   finish {diffuse 0.6 ambient .2 specular .6 roughness .1}
  89.   normal {
  90.     bump_map {
  91.       gif "grooves.gif"  
  92.       bump_size 10
  93.       interpolate 2
  94.       map_type 1    
  95.     }   
  96.   }
  97.   rotate < -80, -15, -30>
  98.   translate < 3.5, 5.5,-1.2>
  99. }
  100. cone {
  101.   <0, 0, 0>,  .8     
  102.   <0, 2.5, 0>, .25        
  103.   pigment {MediumAquamarine}
  104.   finish {diffuse 0.8 ambient .2 specular .6 roughness .1}
  105.   normal {
  106.     bump_map {
  107.       gif "grooves.gif"  
  108.       bump_size 10
  109.       interpolate 2
  110.       map_type 2    
  111.     }   
  112.   }
  113.   translate < 2.8, 1.3, -2.5>
  114.   rotate < 0, 0, -30>
  115.   rotate < 15, 0, 0>
  116. }
  117.  
  118. height_field { 
  119.       gif "curves.gif" 
  120.       translate <-.5, -.5, -.5>
  121.       scale 1.7
  122.       rotate <-45, 45, -30>
  123.       translate <-3, 1, -3>      
  124.       texture {
  125.         pigment {NeonPink filter .5}
  126.         finish {diffuse 0.9 specular .5 roughness .1 }     
  127.       }
  128.       smooth
  129. }